package com.yfp.device.mapper;

import com.yfp.device.domain.MachineTemp;
import com.yfp.device.domain.Machine;
import com.yfp.device.domain.MachineExample;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface MachineMapper {
    long countByExample(MachineExample example);

    int deleteByExample(MachineExample example);

    int deleteByPrimaryKey(String machineId);

    int insert(Machine record);

    int insertSelective(Machine record);

    List<Machine> selectByExample(MachineExample example);

    Machine selectByPrimaryKey(String machineId);

    String selectAsscoiationCodeByPositionId(String positionId);

    int updateByExampleSelective(@Param("record") Machine record, @Param("example") MachineExample example);

    int updateByExample(@Param("record") Machine record, @Param("example") MachineExample example);

    int updateByPrimaryKeySelective(Machine record);

    int updateByPrimaryKey(Machine record);


    Machine selectByMachineSn(String machineSn);

    Machine selectByUserNameAndMachineSn(@Param("userName") String userName, @Param("machineSn") String machineSn);

    List<Machine> selectAll();

    Machine getById(String machineId);

    /**
     * 根据machineId查询
     *
     * @param machineId
     * @return
     */
    Machine findByMachineId(String machineId);

    void insertMachineTemp(MachineTemp machieTemp);

    String findOperationMobile(String positionId);
}